import request from '@/utils/request'

export function productList() {
  return request({
    url: '/ewem/quality/productList',
    method: 'get'
  })
}

export function getProduct(productId) {
  return request({
    url: '/ewem/quality/getProduct/'+productId,
    method: 'get'
  })
}
export function getFirm(firmId) {
  return request({
    url: '/ewem/quality/getFirm/'+firmId,
    method: 'get'
  })
}
export function getDricer(dricerId) {
  return request({
    url: '/ewem/quality/getDricer/'+dricerId,
    method: 'get'
  })
}
export function getGoods(goodsMaterialId) {
  return request({
    url: '/ewem/quality/getGoods/'+goodsMaterialId,
    method: 'get'
  })
}

export function firmList() {
  return request({
    url: '/ewem/quality/firmList',
    method: 'get'
  })
}
export function driversList() {
  return request({
    url: '/ewem/quality/driversList',
    method: 'get'
  })
}
export function goodsMaterialList() {
  return request({
    url: '/ewem/quality/goodsMaterialList',
    method: 'get'
  })
}

// 查询批次
export function prodsList() {
  return request({
    url: '/ewem/quality/lists',
    method: 'get'
  })
}
// 查询列表
export function listQuality(query) {
  return request({
    url: '/ewem/quality/list',
    method: 'get',
    params: query
  })
}
// 新增
export function addQuality(data) {
  return request({
    url: '/ewem/quality/add',
    method: 'post',
    data: data
  })
}
// 修改
export function updateQuality(data) {
  return request({
    url: '/ewem/quality/updates',
    method: 'post',
    data: data
  })
}
export function updatesQuality(data) {
  return request({
    url: '/ewem/quality/zhijian',
    method: 'post',
    data: data
  })
}
// 删除
export function delQuality(qualityId) {
  return request({
    url: '/ewem/quality/dels/' + qualityId,
    method: 'post'
  })
}

export function countProduct() {
  return request({
    url: '/ewem/quality/countProduct',
    method: 'get'
  })
}
